<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>计算输液所用时间</title>
    <script>

        function calculation(){
            var sum = document.getElementById("sum").value;
            var ratio = document.getElementById("ratio").value;
            var per_min = document.getElementById("per_min").value;

            var result = sum * ratio /per_min;
            document.getElementById("result").innerText = result;
        }
    </script>
    <style>
        /**
        将p标签转为行内元素
         */
        p {
            display: inline;
        }
    </style>
</head>
<body>
    液体总量(ml) <input id="sum">
    滴系数(滴/ml) <input id="ratio">
    每分钟滴数(滴/分) <input id="per_min">

    <button onclick="calculation()"> 计算 </button>

    计算结果为：<p id="result"></p>

</body>
</html>